package com.ptu.spzx.model.entity.system;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.ptu.spzx.model.entity.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

@Schema(description = "系统部门实体类")
@Data
public class SysDept implements Serializable {
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @Schema(description = "父节点id")
    private Long parentId;

    @Schema(description = "部门名称")
    private String deptName;

    @Schema(description = "部门描述")
    private String description;

    @Schema(description = "部门状态")
    private Integer status;

    @Schema(description = "部门等级")
    private Integer deptLevel;

    @Schema(description = "子节点")
    private List<SysDept> children;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Schema(description = "创建时间")
    private Date createTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Schema(description = "修改时间")
    private Date updateTime;

    @JsonIgnore
    @TableLogic
    @Schema(description = "是否删除")
    private Integer is_deleted;

}
